package com.sky.mapper;

import com.sky.entity.DishFlavor;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface dish_flavorMapper {
    @Select("select * from dish_flavor where dish_id = #{id} ")
    List<DishFlavor> getflavors(Long id);
    @Insert("insert into dish_flavor values(#{id},#{dishId},#{name},#{value})")
    void insert(DishFlavor df);
    void update(DishFlavor fla,Long dishId,Long ID);
    @Select("select id from dish_flavor where dish_id = #{dishId}")
    List<Long> getidBydish_id(Long dishId);
    void delete_flavors(List<Long> ids);
}
